package com.fhz.a2102shopjava.ui.home;

import androidx.lifecycle.LiveData;

import com.fhz.a2102shopjava.base.BaseRepository;
import com.fhz.a2102shopjava.callback.ApiResponse;
import com.fhz.a2102shopjava.entity.Banner;
import com.fhz.a2102shopjava.entity.GoodsInfo;
import com.fhz.a2102shopjava.entity.ResponseBean;

import java.util.List;

import javax.inject.Inject;

import io.reactivex.Observable;
import io.reactivex.Observer;
import io.reactivex.Scheduler;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
import retrofit2.http.Query;

/**
 * 时间:2023/8/15
 *
 * @author Mr.Feng
 * 简述: TODO
 */
public class HomeRepository extends BaseRepository<HomeDataSource> {

    @Inject
    public HomeRepository(HomeDataSource model) {
        super(model);
    }

    public LiveData<ApiResponse<ResponseBean<List<Banner>>>> getBanner(int type, int page , int pageSize){
        return model.getBanner(type, page, pageSize);
    }

    public LiveData<ApiResponse<ResponseBean<List<GoodsInfo>>>> getGoodsInfo(@Query("page") int page, @Query("pageSize") int pageSize){
        return model.getGoodsInfo(page, pageSize);
    }


}

